#include <iostream>
#include <vector>
using namespace std;

vector<vector<int> > generate(int numRows) {
    // Start typing your C/C++ solution below
    // DO NOT write int main() function
    vector<vector<int> > res;
    if(numRows==0)
        return res;
    vector<int> first;
    first.push_back(1);
    res.push_back(first);
    if(numRows==1){
        return res;
    }
    vector<int> second;
    second.push_back(1);
    second.push_back(1);
    res.push_back(second);
    if(numRows==2){
        return res;
    }

    for(int level=2; level<numRows; ++level){
        vector<int> curLevel;
        curLevel.push_back(1);
        for(int i=1; i<res[res.size()-1].size(); ++i){
            curLevel.push_back(res[res.size()-1][i-1] + res[res.size()-1][i]);
        }
        curLevel.push_back(1);
        res.push_back(curLevel);
    }

    return res;
}

int main(){
    return 0;
}